home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 37 / IOPROG_37.ISO / SOFT / Multilizer.exe / disk1 / data1.cab / data1 / [Group9]VCL Source Standard / Ivaboutd.pas next >
Encoding:
Pascal/Delphi Source File  |  1999-08-12  |  2.7 KB  |  126 lines

  1. unit IvAboutD;
  2.  
  3. {$I IVMULTI.INC}
  4.  
  5. interface
  6.  
  7. uses
  8. {$IFDEF WIN32}
  9.   Windows,
  10. {$ELSE}
  11.   WinTypes, WinProcs,
  12. {$ENDIF}
  13.   Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  14.   StdCtrls, ExtCtrls;
  15.  
  16. type
  17.   TIvAboutDialog = class(TForm)
  18.     Panel1: TPanel;
  19.     OKButton: TButton;
  20.     ProgramIcon: TImage;
  21.     ProductName: TLabel;
  22.     Version: TLabel;
  23.     Copyright: TLabel;
  24.     Comments: TLabel;
  25.     URL: TLabel;
  26.     CopyrightSupra: TLabel;
  27.     URLSupra: TLabel;
  28.     Email: TLabel;
  29.     EmailLabel: TLabel;
  30.     procedure URLClick(Sender: TObject);
  31.     procedure FormCreate(Sender: TObject);
  32.     procedure EmailClick(Sender: TObject);
  33.   public
  34.   end;
  35.  
  36. implementation
  37.  
  38. {$R *.DFM}
  39.  
  40. uses
  41. {$IFDEF WIN32}
  42.   ShellAPI,
  43. {$ENDIF}
  44.   IvCommon, IvDictio;
  45.  
  46. procedure TIvAboutDialog.FormCreate(Sender: TObject);
  47.  
  48. {$IFNDEF WIN32}
  49.   procedure DisableLink(link: TLabel);
  50.   begin
  51.     link.Cursor := crDefault;
  52.     link.Font.Color := clWindowText;
  53.     link.Font.Style := URL.Font.Style - [fsUnderline];
  54.   end;
  55. {$ENDIF}
  56.  
  57. {$IFNDEF IVVB}
  58. const
  59.   GAP_C = 16;
  60. {$ENDIF}
  61. var
  62.   code: TIvLicense;
  63. begin
  64.   code := TIvLicense(StrToInt(GetMLRegistryValue(DICTIONARY_CODE_C, '0')));
  65.   
  66. {$IFDEF IVVB}
  67.   Version.Caption := Format('%s Version %s.%s', [LICENSE_NAMES_C[code], VB_VER_C, VB_VER_SUB_C]);
  68.   ProductName.Caption := 'MULTILIZER Visual Basic Edition';
  69.   Comments.Caption :=
  70.     'MULTILIZER Visual Basic Edition includes the complete set of components and tools ' +
  71.     'for localizing software to all languages and character sets in Visual Basic.';
  72.   Email.Caption := 'visualbasic@multilizer.com';
  73. {$ELSE}
  74.   Version.Caption := Format('%s Version %s.%s', [LICENSE_NAMES_C[code], VCL_VER_C, VCL_VER_SUB_C]);
  75.   CopyrightSupra.Hide;
  76.   URLSupra.Hide;
  77.   URL.Top := URL.Top - GAP_C;
  78.   Comments.Top := Comments.Top - GAP_C;
  79.   EmailLabel.Top := EmailLabel.Top - GAP_C;
  80.   Email.Top := Email.Top - GAP_C;
  81.   Panel1.Height := Panel1.Height - GAP_C;
  82.   OKButton.Top := OKButton.Top - GAP_C;
  83.   Height := Height - GAP_C;
  84. {$ENDIF}
  85.  
  86. {$IFNDEF WIN32}
  87.   DisableLink(URL);
  88.   DisableLink(URLSupra);
  89.   DisableLink(Email);
  90. {$ENDIF}
  91.  
  92. {$IFDEF IVWIDE}
  93.   URL.Cursor := crHandPoint;
  94.   URLSupra.Cursor := crHandPoint;
  95.   Email.Cursor := crHandPoint;
  96. {$ENDIF}
  97. end;
  98.  
  99. procedure TIvAboutDialog.URLClick(Sender: TObject);
  100. begin
  101. {$IFDEF WIN32}
  102.   ShellExecute(
  103.     Application.Handle,
  104.     'open',
  105.     PChar('http://' + (Sender as TLabel).Caption),
  106.     nil,
  107.     nil,
  108.     SW_SHOW);
  109. {$ENDIF}
  110. end;
  111.  
  112. procedure TIvAboutDialog.EmailClick(Sender: TObject);
  113. begin
  114. {$IFDEF WIN32}
  115.   ShellExecute(
  116.     Application.Handle,
  117.     'open',
  118.     PChar('mailto:' + (Sender as TLabel).Caption),
  119.     nil,
  120.     nil,
  121.     SW_SHOW);
  122. {$ENDIF}
  123. end;
  124.  
  125. end.
  126.